﻿using System;
using System.Windows.Forms;

using StreakyDownloader.Model;

namespace StreakyDownloader.View
{
   public partial class frmDownloadProgress : Form
   {
      protected FileDownloader m_fileDownloader;

      public frmDownloadProgress(FileDownloader downloader)
      {
         InitializeComponent();

         m_fileDownloader = downloader;

         // bind lblCurrentFilename to the model
         lblCurrentFilename.DataBindings.Add("Text", m_fileDownloader, "CurrentFile");

         // bind lblcurrentBytes to the model
         lblCurrentBytes.DataBindings.Add("Text", m_fileDownloader, "BytesDownloaded");

         // TODO: bind lbltotalBytes to the model
         lblTotalBytes.DataBindings.Add("Text", m_fileDownloader, "BytesTotal");
      }
   }
}
